home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
dev
/
gcc
/
ixemsdk.lha
/
man
/
cat3
/
fread.0
< prev
next >
Wrap
Text File
|
1996-09-02
|
2KB
|
43 lines
FREAD(3) UNIX Programmer's Manual FREAD(3)
NNAAMMEE
ffrreeaadd, ffwwrriittee - binary stream input/output
SSYYNNOOPPSSIISS
##iinncclluuddee <<ssttddiioo..hh>>
_s_i_z_e___t
ffrreeaadd(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_i_z_e, _s_i_z_e___t _n_m_e_m_b, _F_I_L_E _*_s_t_r_e_a_m)
_s_i_z_e___t
ffwwrriittee(_c_o_n_s_t _v_o_i_d _*_p_t_r, _s_i_z_e___t _s_i_z_e, _s_i_z_e___t _n_m_e_m_b, _F_I_L_E _*_s_t_r_e_a_m)
DDEESSCCRRIIPPTTIIOONN
The function ffrreeaadd() reads _n_m_e_m_b objects, each _s_i_z_e bytes long, from the
stream pointed to by _s_t_r_e_a_m, storing them at the location given by _p_t_r.
The function ffwwrriittee() writes _n_m_e_m_b objects, each _s_i_z_e bytes long, to the
stream pointed to by _s_t_r_e_a_m, obtaining them from the location given by
_p_t_r.
RREETTUURRNN VVAALLUUEESS
The functions ffrreeaadd() and ffwwrriittee() advance the file position indicator
for the stream by the number of bytes read or written. They return the
number of objects read or written. If an error occurs, or the end-of-
file is reached, the return value is a short object count (or zero).
The function ffrreeaadd() does not distinguish between end-of-file and error,
and callers must use feof(3) and ferror(3) to determine which occurred.
The function ffwwrriittee() returns a value less than _n_m_e_m_b only if a write er-
ror has occurred.
SSEEEE AALLSSOO
read(2), write(2)
SSTTAANNDDAARRDDSS
The functions ffrreeaadd() and ffwwrriittee() conform to ANSI C3.159-1989 (``ANSI
C'').
BSD Experimental March 8, 1994 1